﻿@{
    Layout = "_Account";
}
<div class="tn-box tn-widget tn-widget-content tn-corner-all tnc-activation">
    <div class="tn-box-content tn-widget-content tn-corner-all">
        <div class="tnc-activation-wrapper">
            <div class="tnc-activation-icon">
                <span class="tn-icon-large tn-largeicon-accept-circle"></span>
            </div>
            <div class="tnc-adcivation-box">
                <h4>
                    等待管理员审核！</h4>
                <p class="tnc-activation-text">
                    欢迎注册 @ViewData["SiteName"] ,管理员正在对您的帐号进行审核.... 通过审核后将会用邮件通知您</p>
                <p class="tnc-return">
                    <span id="jumpTime" class="tnc-seconds">5</span> 秒后自动回社区首页</p>
                <p>
                    @Html.Button("回到首页", ButtonTypes.Link, HighlightStyles.Primary, ButtonSizes.Large, url: SiteUrls.Instance().SiteHome(), htmlAttributes: new { id = "button-home" })
                    @if (UserContext.CurrentUser != null)
                    {
                        @Html.Button("个人首页", ButtonTypes.Link, HighlightStyles.Primary, ButtonSizes.Large, url: SiteUrls.Instance().MyHome(UserContext.CurrentUser.UserId))
                    }
                </p>
            </div>
        </div>
    </div>
</div>
<script language="javascript" type="text/javascript">
    $(document).ready(function () {
        setTimeout(function () { jump() }, 1000);
    });
    function jump() {
        var jumpNum = parseInt($(document.getElementById("jumpTime")).html());
        jumpNum -= 1;
        if (jumpNum <= 0) {
            window.location.href = $("#button-home").attr("href");
        }
        $("#jumpTime").html(jumpNum);
        setTimeout(function () { jump() }, 1000);
    }
</script>
